package freedom.ms.auth.entity;

import java.util.Date;

import javax.persistence.Id;

import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

@Document(collection = "error_message")
public class ErrorMessage {

	@Id
	private ObjectId id;
	private Date time;
	private String url, message;
	
	public ErrorMessage() {
		super();
	}

	public ErrorMessage(Date time, String url, String message) {
		super();
		this.time = time;
		this.url = url;
		this.message = message;
	}

	public ObjectId getId() {
		return id;
	}

	public void setId(ObjectId id) {
		this.id = id;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public String toString() {
		return "ErrorMessage [id=" + id + ", time=" + time + ", url=" + url + ", message=" + message + "]";
	}

}
